package com.micro.ai.models.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDate;

/**
 * 模型定义创建请求DTO
 * 
 * @author micro-ai
 * @since 0.0.1
 */
@Data
@Schema(description = "模型定义创建请求")
public class ModelDefinitionCreateRequest implements Serializable {

    private static final long serialVersionUID = 1L;

    @NotBlank(message = "租户ID不能为空")
    @Schema(description = "租户ID", example = "tenant_001", required = true)
    private String tenantId;

    @NotBlank(message = "模型名称不能为空")
    @Schema(description = "模型名称", example = "gpt-4", required = true)
    private String modelName;

    @Schema(description = "模型别名", example = "GPT-4")
    private String modelAlias;

    @NotBlank(message = "供应商ID不能为空")
    @Schema(description = "供应商ID", example = "vendor_123", required = true)
    private String vendorId;

    @NotBlank(message = "类型ID不能为空")
    @Schema(description = "类型ID", example = "type_123", required = true)
    private String typeId;

    @Schema(description = "上下文长度（最大token数）", example = "8192")
    private Integer contextLength;

    @Schema(description = "最大输出token数", example = "2048")
    private Integer maxOutputTokens;

    @Schema(description = "是否支持函数调用", example = "true")
    private Boolean supportFunctions;

    @Schema(description = "是否支持视觉（图片理解）", example = "true")
    private Boolean supportVision;

    @Schema(description = "是否支持微调", example = "true")
    private Boolean supportFineTuning;

    @Schema(description = "支持的微调方法（JSON格式）", example = "[\"lora\",\"full_fine_tuning\"]")
    private String fineTuningMethods;

    @Schema(description = "描述", example = "GPT-4是最新一代的大语言模型，具有强大的推理能力")
    private String description;

    @Schema(description = "模型元数据（JSON格式）", example = "{\"parameters\":\"175B\",\"architecture\":\"transformer\"}")
    private String modelMetadata;

    @Schema(description = "状态（active-活跃，deprecated-已弃用，beta-测试版）", example = "active", allowableValues = {"active", "deprecated", "beta"})
    private String status;

    @Schema(description = "发布日期", example = "2023-03-14")
    private LocalDate releaseDate;

    @Schema(description = "创建人ID", example = "1001")
    private String createdBy;
}

